<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="stylesheet" href="css/all.css">
    <link rel="stylesheet" href="css/foot.css">
    <link rel="stylesheet" href="css/login/head.css">
    <link rel="stylesheet" href="css/login/body.css">
</head>
<body>
    <div>
        <div class="head">
            <div class="content item_clear">
               <div class="head_img floatl">
                    品优购
               </div> 
            </div>
        </div>
        <div class="body">
            <div class="banner content item_clear posi_relative">
                <div class="phone">
                    <form action="">
                        <input type="text" placeholder="手机节">
                        <input type="submit" value="搜索">
                    </form>
                </div>
                <div class="body_login floatr">
                    <form  action="index.html" onsubmit="return validateForm(user,passwords)" method="post">
                        <div class="item_clear">
                            <label for="" class="floatl"><a href="">扫描登录</a> </label><span class="floatl">|</span><label for="" class="floatl"><a href="">账号登录</a></label>
                        </div>
                        <p>公共场所不建议登录，以免账号丢失</p>
                        <div class="user">
                            <input type="text" value="" id="user">
                        </div>
                        <div class="password">
                            <input type="password" value="" id="passwords">
                        </div>
                        <div class="longin_ch item_clear">
                            <input type="checkbox" name="" id="checkpassword"><span>自动登录</span>
                            <b><a href="">忘记密码？</a></b>
                        </div>
                        <div class="lg_bt">
                            <button type="submit" >登录</button>
                        </div>
                        <div class="longin_img">
                            <div class="floatl">

                            </div>
                            <div class="floatr">
                                <a href="" >立即注册</a>
                            </div>
                            
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="foot">
            <div class="content">
                <div class="foot_span1">
                    <ul class="item_clear">
                        <li><a href="">关于我们</a><span>|</span></li>
                        <li><a href="">联系我们</a><span>|</span></li>
                        <li><a href="">联系客服</a><span>|</span></li>
                        <li><a href="">商家入驻</a><span>|</span></li>
                        <li><a href="">营销中心</a><span>|</span></li>
                        <li><a href="">手机品优购</a><span>|</span></li>
                        <li><a href="">友情链接</a><span>|</span></li>
                        <li><a href="">销售联盟</a><span>|</span></li>
                        <li><a href="">品优购社区</a><span>|</span></li>
                        <li><a href="">品优购公益</a><span>|</span></li>
                        <li><a href="">English Site</a><span>|</span></li>
                        <li><a href="">Contact U</a></li>
                    </ul>
                </div>
                <div class="foot_span2">
                    <p>地址：北京市昌平区建材西路金燕龙办公楼一层&nbsp;邮编：100096&nbsp;电话：400-618-4000&nbsp;传真：010-82935100&nbsp;邮箱：zhanghj+itcast.cn</p>
                </div>
                <div class="foot_span3">
                    京ICP&nbsp;08001421&nbsp;号京公网安备&nbsp;110108007702
                </div>
            </div>   
        </div>
    </div>
    <script>
        function validateForm(user,passwords){
            var Users = document.getElementById("user").value;
            var pass_word = document.getElementById("passwords").value;
            // window.alert(Users);
            if ( Users == '' ) 
            {
                window.alert("请填写用户名！");
                return false;
            } else if ( Users == null )
            {
                window.alert("请填写用户名！");
                return false;
            } else 
            {
                if ( pass_word == '666666' ) {
                    window.alert("欢迎测试员");
                    return (Users,pass_word);
                } else if ( pass_word == '123456' )
                {
                    window.alert("欢迎用户" + Users);
                    return (Users,pass_word);
                }
                else if ( pass_word == '' )
                {
                    window.alert("请输入密码！");
                    return false;
                } else if ( pass_word == null )
                {
                    window.alert("请输入密码！");
                    return false;
                } else {
                    window.alert("密码错误！");
                    return false;
                }
            }
        }
    </script>
</body>
</html>
<!-- if ( pass_word == '666666' ) 
           {
                window.alert("欢迎管理员");
           } else if ( PassWord == '123456' ) 
           {
            window.alert("欢迎用户" + Users);
           } else if ( PassWord == null ) or ( PassWord == '' )
           {    
            window.alert("请输入密码！");
           }  -->